* configure.in: Complain if srcdir points at an already-configured
authorJim Blandy <jimb@redhat.com>
Sun, 30 May 1993 18:24:08 +0000 (18:24 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 30 May 1993 18:24:08 +0000 (18:24 +0000)
tree.

configure1.in

index 4251cac07d15a483b6cc1ff51b2ad18e3d7bb807..9badb35e10daa1f74fc1f90de389b51b1ae87093 100755 (executable)
@@ -354,6 +354,14 @@ case "${srcdir}" in
   *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
 esac
 
+#### Make sure that the source directory doesn't already have a
+#### configured system in it.
+if [ -f "${srcdir}/src/config.h" ] ; then
+  (echo "${progname}: the directory tree \`${srcdir}' is being used as a build"
+   echo "  directory right now; it has been configured in its own right."
+   echo "  You can't use srcdir in this situation.") >&2
+  exit 1
+fi
 
 ### Make the necessary directories, if they don't exist.
 if [ ! -d ./src ]; then